package com.xiaoxi.facademode.database;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @Author xiaoxi
 * @ProjectName design_mode
 * @PackageName com.xiaoxi.facademode.database
 * @ClassName DatabaseProperties
 * @Description TODO
 * @Date 2023/3/23 20:54
 * @Version 1.0
 */
public class DatabaseProperties {
    private DatabaseProperties() {
    }

    public static Properties getProperties(String dbname) {
        Properties properties = new Properties();
        try {
            properties.load(new FileInputStream("D:\\IDEA\\xiaoxi\\design_mode\\facade_mode\\src\\main\\resources\\" + dbname + ".txt"));
        } catch (IOException ioException) {
            System.out.println("file is not found : " + dbname + ".txt");
        }
        return properties;
    }

}
